package com.ysjy.course.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.wkbb.common.handler.JsonUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
@Data
@ApiModel("订单表")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class YsOrder implements Serializable {

    @ApiModelProperty("订单ID")
    private Long id;
    @ApiModelProperty("订单唯一标识")
    private String orderNumber;
    @ApiModelProperty("订单标题（课程标题）")
    private String title;
    @ApiModelProperty("订单logo（商品logo）")
    private String logo;
    @ApiModelProperty("订单总金额(分)")
    private Integer amount;
    @ApiModelProperty("商品金额(分)")
    private Integer originalAmount;
    @ApiModelProperty("支付状态:0未支付 1已支付 2已取消")
    private Integer payStatus;
    @ApiModelProperty("支付时间")
    private Date payTime;
    @ApiModelProperty("支付流水号(第三方订单号)")
    private String payCode;
    @ApiModelProperty("支付方式：0线下支付 1微信 2支付宝")
    private Integer payType;

    @ApiModelProperty("报名开始时间")
    private Date signUpStartTime;
    @ApiModelProperty("报名结束时间")
    private Date signUpEndTime;
    @ApiModelProperty("适合年级 多个','分割(注：所有年级为`全部`)")
    private String gradeNames;

    @ApiModelProperty("订单类型 1课程 2托管 3课程包")
    private Integer orderType;
    @ApiModelProperty("商品唯一标识 （课程、托管uniqueId）")
    private String goodNumber;
    @ApiModelProperty("下单人唯一标识，家长ID")
    private Long userId;
    @ApiModelProperty("家长手机号")
    private String mobile;
    @ApiModelProperty("微信OpenId")
    private String openId;
    @ApiModelProperty("学校ID")
    private Long orgId;
    @ApiModelProperty("学校名称")
    private String orgName;
    @ApiModelProperty("学生ID")
    private Long studentId;
    @ApiModelProperty("学生姓名")
    private String stuName;
    @ApiModelProperty("学生年级名称")
    private String stuGradeName;
    @ApiModelProperty("学生班级名称")
    private String stuClassName;

    @ApiModelProperty("审核人员id")
    private Long auditUserId;
    @ApiModelProperty("审核人员")
    private String auditUserName;
    @ApiModelProperty("退款唯一标识")
    private String refundNumber;
    @ApiModelProperty("退款状态：0用户申请退款、1已退款、2拒绝退款")
    private Integer refundStatus;
    @ApiModelProperty("退款时间")
    private Date refundTime;
    @ApiModelProperty("申请退款时间")
    private Date applyRefundTime;
    @ApiModelProperty("退款原因")
    private String refundWhy;
    @ApiModelProperty("退款金额(分)")
    private Integer refundAmount;
    @ApiModelProperty("退款说明")
    private String refundExplain;
    @ApiModelProperty("状态 1启用 0禁用")
    private Boolean enabled;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新时间")
    private Date updateTime;

    public static void main(String[] args) {
        YsOrder order = new YsOrder();
        order.setOrderNumber("2022052411111726");
        order.setOpenId("o4gSG4vLZ3_GqOQaVyEicxoWFZ6k");
//        order.setRefundAmount(1);
//        order.setRefundWhy("不想上了");
//        order.setRefundExplain("不想上了，退款说明");
        System.out.println(JsonUtil.objectToJson(order));
    }
}
